<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnGroupInPlan extends AbstractMigration
{
    public function up()
    {
        $this->table('plan')
            ->addColumn('group_uuid', 'char', ['default' => '', 'limit' => 36, 'comment' => '组的全局唯一标识符'])
            ->addColumn('group_name', 'string', ['default' => '', 'limit' => 128, 'comment' => '组的名字'])
            ->save();
    }

    public function down()
    {
        $this->table('plan')
            ->removeColumn('group_uuid')
            ->removeColumn('group_name')
            ->save();
    }
}
